package com.banhujiu.common.utils;

import java.util.ArrayList;
import java.util.List;

import static com.banhujiu.common.utils.ObjectsUtils.isEmpty;

/**
 * @author banhujiu
 * @date 2018/4/5 0005 15:06
 */
public class StringUtils {
	public static List<Long> strToLongList(String str, String split) {
		List<Long> rslt = new ArrayList<>();
		if (str == null) {
			return rslt;
		}
		for (String s : str.split(split)) {
			if (!isEmpty(s)) {
				rslt.add(Long.parseLong(s));
			}
		}
		return rslt;
	}
}
